import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service
//根据社会信用代码查询分包商基础信息
const subcontractorBasicInformation = params => {
    return httpGet({
        url: '/outer/subcontractor/findbycreditcode',
        params
    })
}
//修改分包商
const saveSubcontractor = params => {
    return httpPost({
        url: '/outer/subcontractor/update',
        params
    })
}
//新增分包商
const subcontractorAdd = params => {
    return httpPost({
        url: '/outer/subcontractor/create',
        params
    })
}
//分包商资质信息列表
const qualificationList = billId => {
    return httpGet({
        url: `/outer/subcontractor/qualification/index/${billId}`,
    })
}
//分包商资质信息新增(修改)
const qualificationAdd = params => {
    return httpPost({
        url: '/outer/subcontractor/qualification/create',
        params
    })
}
//分包商业绩列表
const performanceList = params => {
    return httpPost({
        url: '/outer/subcontractor/performance/index',
        params
    })
}
//分包商业绩新增
const performanceAdd = params => {
    return httpPost({
        url: '/outer/subcontractor/performance/create',
        params
    })
}
//分包商主要管理人员列表
const staffList = billId => {
    return httpPost({
        url: `/outer/subcontractor/staff/index/${billId}`,
    })
}
//分包商主要管理人员新增
const staffAdd = params => {
    return httpPost({
        url: '/outer/subcontractor/staff/create',
        params
    })
}
//分包商附件列表
const enclosureList = params => {
    return httpPost({
        url: '/outer/subcontractor/attach/index/{billId}',
        params
    })
}
//分包商附件信息新增
const enclosureAdd = params => {
    return httpPost({
        url: '/outer/subcontractor/attach/create',
        params
    })
}
//分包商获取评价历史
const getEvaluateList = params => {
    return httpGet({
        url: '/outer/list/evaluate/history',
        params
    })
}
//统一作废接口
const toVoid = params => {
    return httpPost({
        url: '/outer/common/nullify',
        params
    })
}
//获取附件信息
const getEnclosureList = params => {
    return httpGet({
        url: '/outer/attachment/list',
        params
    })
}
//新增附件信息
const addEnclosure = params => {
    return httpPost({
        url: '/outer/attachment/update',
        params
    })
}
//根据分包商名称查询分包商基础信息
const getBaseName = params => {
    return httpGet({
        url: '/outer/subcontractor/find/by/subcontractor/name',
        params
    })
}
export {
    subcontractorBasicInformation,
    saveSubcontractor,
    subcontractorAdd,
    qualificationList,
    qualificationAdd,
    performanceList,
    performanceAdd,
    staffList,
    staffAdd,
    enclosureList,
    enclosureAdd,
    getEvaluateList,
    toVoid,
    getEnclosureList,
    addEnclosure,
    getBaseName

}